import greenfoot.*;  // (World, Actor, GreenfootImage, Greenfoot and MouseInfo)

/**
 * Write a description of class RegMenu here.
 * 
 * @author (your name) 
 * @version (a version number or a date)
 */
public class RegMenu extends Menu
{
    /**
     * Act - do whatever the RegMenu wants to do. This method is called whenever
     * the 'Act' or 'Run' button gets pressed in the environment.
     */
    
    GreenfootImage m=new GreenfootImage("return.jpg");
    /**
     * Metodo que escala la imagen regmenu, que sirve para regresarte al menu principal
     */
    public RegMenu() 
    {
        setImage(m);
        m.scale(80,80);
    }
    
    /**Manda llamar al metodo quita
     * 
     */
    public void act() 
    {
        if(Greenfoot.mouseClicked(this))
          {
            quita();   
           }
    }  
    
    /**
     * Metodo que te regresa al menu principal, ademas de que remueve el boton de regresa
     */
    public void quita()
    {
        Mundo mundo=(Mundo)getWorld();
        mundo.menu();
        mundo.removeObject(this);    
    }    
}
